cody - HTMLify profile

cody
4270 Files
632542 Views
Latest files of /cody/solygambas/html-css-javascript-projects/006-scroll animation
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap");
* {
box-sizing: border-box;
}
body {
background-color: #efedd6;
* {
box-sizing: border-box;
}
body {
background-color: #efedd6;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="style.css" />
<title>Scroll Animation</title>
</head>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="style.css" />
<title>Scroll Animation</title>
</head>
const boxes = document.querySelectorAll(".box");
const checkBoxes = () => {
const triggerBottom = (window.innerHeight / 5) * 4;
boxes.forEach((box) => {
const boxTop = box.getBoundingClientRect().top;
if (boxTop < triggerBottom) box.classList.add("show");
else box.classList.remove("show");
const checkBoxes = () => {
const triggerBottom = (window.innerHeight / 5) * 4;
boxes.forEach((box) => {
const boxTop = box.getBoundingClientRect().top;
if (boxTop < triggerBottom) box.classList.add("show");
else box.classList.remove("show");